<template>
  <div class="color-gray xui-margin-top-xs xui-margin-bottom-sm xui-fc ">
    <div v-if="isEN" class="xui-fl xui-margin-top-xs">
      <span v-if="detail.publishDate" class="xui-margin-right-xxl">Time：{{detail.publishDate || detail.pubdate}}</span>
      <span class="xui-margin-right-xxl">Views：{{count}}</span>
      <span class="xui-margin-right-xxl">Source：{{detail.articleFrom || "CSM"}}</span>
    </div>
    <div v-else class="xui-fl xui-margin-top-xs">
      <span v-if="detail.publishDate" class="xui-margin-right-xxl">发布时间：{{detail.publishDate || detail.pubdate}}</span>
      <span class="xui-margin-right-xxl">浏览次数：{{count}}</span>
      <span class="xui-margin-right-xxl">文章来源：{{detail.articleFrom || "长沙博物馆"}}</span>
    </div>
    <myshare v-if="hackReset" class="xui-fr" :title="detail.title"></myshare>
  </div>
</template>
<script>
  import {
    getLang,
    setLang,
    removeLang
  } from "@/utils/lang";
  import myshare from "@/components/widge/share";

  export default {
    components: {
      myshare
    },
    props: ["detail", "count"],
    data() {
      return {
        browNum: 0,
        hackReset: true
      };
    },
    computed: {
      lang() {
        return getLang();
      },
      isEN() {
        return getLang() == "en";
      },
      route() {
        return this.$route;
      }
    },
    methods: {},
    watch: {
      route() {
        this.hackReset = false;
        setTimeout(() => {
          this.hackReset = true;
        }, 50);
      }
    }
  };

</script>
